home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 138
/
Volume 138 Aug 19 2011 - Damaged.iso
/
Games
/
guardian_angel.swf
/
scripts
/
DefineSprite_359
/
frame_1
/
DoAction.as
Wrap
Text File
|
2011-08-19
|
5KB
|
226 lines
if(death != "1" or "0" < protect)
{
if("0" < protect)
{
if(getProperty("laufer", _visible) == "1")
{
setProperty("laufer", _visible, "0");
}
else
{
setProperty("laufer", _visible, "1");
}
}
else
{
setProperty("laufer", _visible, "1");
}
protect -= "1";
mousedist = "80";
xsize = "20";
ysize = "40";
if(smoke < "14.5")
{
smoke += "0.5";
}
else
{
smoke = "0";
}
set("r" add smoke add ":color","1");
setProperty("r" add smoke, _rotation, random("4") * "90");
setProperty("r" add smoke, _X, laufx);
setProperty("r" add smoke, _Y, laufy);
if(fallen == "0")
{
setProperty("r" add smoke, _X, laufx + random("30") - "15");
}
setProperty("r" add smoke, _xscale, "400");
setProperty("r" add smoke, _yscale, "400");
setProperty("r" add smoke, _alpha, "150");
drgx = getProperty("../drg", _X);
drgy = getProperty("../drg", _Y);
tellTarget("r" add smoke)
{
play();
}
if(fallen == "1")
{
stepy += "2";
stepx *= "0.9";
if("0" < drgx)
{
stepx += drgx / "60";
if(wingmove == "0")
{
tellTarget("laufer")
{
gotoAndStop(5);
}
}
}
else
{
stepx += drgx / "60";
if(wingmove == "0")
{
tellTarget("laufer")
{
gotoAndStop(1);
}
}
}
}
if(fallen == "0")
{
stepy = "0";
wingmove = "0";
wings = "3";
if(mousedist < drgx or drgx < - mousedist)
{
stepx += drgx / "60";
if(mousedist < drgx and wingmove == "0")
{
tellTarget("laufer")
{
gotoAndStop(4);
}
}
if(drgx < - mousedist and wingmove == "0")
{
tellTarget("laufer")
{
gotoAndStop(2);
}
}
}
else
{
stepx = "0";
if("0" < drgx and wingmove == "0")
{
tellTarget("laufer")
{
gotoAndStop(6);
}
}
if("0" >= drgx and wingmove == "0")
{
tellTarget("laufer")
{
gotoAndStop(3);
}
}
}
}
if(xcontact == "1")
{
stepx = "3";
xcontact = "0";
}
if(xcontact == "2")
{
stepx = - "3";
xcontact = "0";
}
if("7" < stepy)
{
stepy = "7";
}
if("6" < stepx)
{
stepx = "6";
}
if(stepx < - "6")
{
stepx = - "6";
}
laufx += "2" * stepx;
laufy += stepy;
setProperty("laufer", _X, laufx);
setProperty("laufer", _Y, laufy);
_X = - laufx;
_Y = - laufy;
fallen = "1";
setProperty("../back", _X, laufx / (- "2"));
setProperty("../back", _Y, laufy / (- "2"));
if(wingmove == "1")
{
if(drgx < "0")
{
tellTarget("laufer")
{
gotoAndStop(7);
}
if(wingalert == "1")
{
tellTarget("laufer/wing")
{
gotoAndPlay(1);
}
}
}
else
{
tellTarget("laufer")
{
gotoAndStop(8);
}
if(wingalert == "1")
{
tellTarget("laufer/wing")
{
gotoAndPlay(1);
}
}
}
}
wingalert = "0";
if(wings < "0")
{
wingmove = "0";
}
tellTarget("../wings")
{
gotoAndStop(eval("../boden:wings") * "2" + "1");
}
}
else
{
tellTarget("laufer")
{
gotoAndStop("death");
}
}
set("../:lifes",eval("/:lifes"));
set("../:score",eval("/:score"));
if(eval("/:lifes") < "0")
{
set("/:level","1");
keyscore = (eval("/:score") * "42" - "42") * "42";
getURL("highscore.php?action=update&points=" add keyscore,"highscore");
tellTarget("/")
{
gotoAndPlay(1);
}
}
scheinx += (laufx - scheinx) / "4";
scheiny += (laufy - scheiny) / "4";
setProperty("heiligenschein", _X, scheinx - "5");
setProperty("heiligenschein", _Y, scheiny - "125");
setProperty("heiligenschein", _xscale, "100");
setProperty("heiligenschein", _yscale, "100");
setProperty("heiligenschein", _rotation, - laufx + scheinx);
set("../:kidsmessage","ENEMY POWER: " add hits);
if("0" >= hits and check == "1")
{
hits = "0";
protect = "200";
set("enemy:death","1");
tellTarget("../madeit")
{
play();
}
}
check = "1";